<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    var change = function (amount, coins) {
      const dp = new Array(amount + 1).fill(0);
      dp[0] = 1;
      for (const coin of coins) {
        for (let i = coin; i <= amount; i++) {
          dp[i] += dp[i - coin];
        }
<<<<<<< HEAD
      }
      return dp[amount];
    };

=======
    }
    return dp[amount];
};
>>>>>>> ee3179a7e6505cad67692a2028f1f120711e7cba
  </script>
</body>

</html>